package com.wzq.demo.controller;

import com.wzq.demo.service.IDemoService;
import com.wzq.mvcframework.annotations.WzqAutowired;
import com.wzq.mvcframework.annotations.WzqController;
import com.wzq.mvcframework.annotations.WzqRequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author wzq.Jolin
 * @company none
 * @create 2020-07-14 08:39
 */
@WzqController
@WzqRequestMapping("/demo")
public class DemoController {

    @WzqAutowired
    private IDemoService demoService;

    /**
     * URL: /demo/query?name=wzq
     * @param request
     * @param response
     * @param name
     * @return
     */
    @WzqRequestMapping("/query")
    public String query(HttpServletRequest request, HttpServletResponse response, String name) {
        return demoService.get(name);
    }
}
